<template>
    <div class="swiper">
        <swiper :option="swiperOption">
            <swiper-slide v-for="item of imgs" :key="item.id">
                <img :src="item.imgUrl"  class="swiper-img">
            </swiper-slide>
        </swiper>
        <div class="swiper-pagination"  slot="pagination"></div>
    </div>
</template>

<script>
export default {
  name: 'HomeSwiper',
  data () {
    return {
      imgs: [{
        id: '001',
        imgUrl: 'https://www.qmwtp.com/application/PC/views/ActivityPc2/img/bg_banner.png'
      }, {
        id: '002',
        imgUrl: 'https://www.qmwtp.com/application/PC/views/ActivityPc2/img/bg_banner.png'
      }, {
        id: '003',
        imgUrl: 'https://www.qmwtp.com/application/PC/views/ActivityPc2/img/bg_banner.png'
      }],
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true,
        autoplay: true
      }
    }
  }
}
</script>

<style lang="stylus" scoped>
.swiper >>> .swiper-pagination-bullet-active
    background: #000
.swiper
    padding-bottom: 1rem
    height: 0
    width: 100%
    padding-bottom: 57%
    overflow: hidden
    .swiper-img
        width: 100%
</style>
